<pre>
<h1>修改,查看日志</h1>
<div>
	<form id="fsysLog">
		<input id="opttype" hidden="hidden" name="opttype" value="${type}" />

		ID : <input id="id"  flag="dis"   name="id" value="${sysLog.id}" />

		内容 : <textarea cols="30" rows="3" id="content" name="content">${sysLog.content}</textarea>
		类型 :
			<select id="type" name="type">
				<option value="0" #if($sysLog.type == 0 ) selected="selected" #end >增加数据</option>
				<option value="1" #if($sysLog.type == 1 ) selected="selected" #end >修改数据</option>
				<option value="2" #if($sysLog.type == 2 ) selected="selected" #end >删除数据</option>
				<option value="3" #if($sysLog.type == 3 ) selected="selected" #end >登录系统</option>
				<option value="5" #if($sysLog.type == 5 ) selected="selected" #end >查询数据</option>
				<option value="4" #if($sysLog.type == 4 ) selected="selected" #end >其他</option>
				<option value="9" #if($sysLog.type == 9 ) selected="selected" #end >系统异常</option>
			</select>
		操作模块 : <input id="optunit" name="optunit" #if($sysLog.optunit) value="${sysLog.optunit}" #end  />

		创建人ID : <input id="optuserid" flag="dis" disabled="disabled" name="optuserid" value="${sysLog.optuserid}" />
		创建人姓名 : <input id="optusername" flag="dis" disabled="disabled" name="optusername" value="${sysLog.optusername}" />
		创建时间: <input id="createtime" flag="dis" disabled="disabled" name="createtime" value="${sysLog.createtime}" />

       
		 	   
	</form>
	
	
       
       <button id="tijiao" onclick="update()"> 提交</button>
       
</div>
</pre>
<script type="text/javascript">

function update(){
	 $.ajax({
		url:"${path}/log/update",
		Type:"POST",
		aysnc:false,
		data:$("#fsysLog").serialize(),
		dataType:"json",
		success:function(data){
			console.log(data.message);
			alert("修改成功！");
			location.href= "${path}/log/index";
		},
		error:function(data){
			console.log("异常！！！");
			console.log(data);
		}
	});
}


	(function() {
		var optType = "${optType}";
		if("detail"==optType){//是查看
			$("#tijiao").hide()
			$("form input,textarea,select").attr("disabled","disabled");
		}else{
			$("form input,textarea,select").removeAttr("disabled");
		}
        $("[flag=dis]").attr("readonly","readonly");//最终是 readreadonlyonly

	})();
</script>